Subject: Explorer FSM updates

From: [email-masked] (Paul Brittain)
Date: Fri, 2 Sep 94 12:37:23 BST

Steve,

I agree with your updates to the Explorer FSM I posted a while back, with the
following exception:

DLC_RESOLVE_C and DLC_RESOLVE_R seem like bad choices for the new DLC
action/event as we already have an event/action (respectively) of the same name.
How about DLC_RESOLVE for the action and DLC_RESOLVED for the event?

Appended below is an updated FSM that reflects these changes and can be used as
the basis for input to Alan if the group agrees.  I have also included the other
updates that would be required to merge this with v0.12 of the spec.  please
post any comments on these suggested changes.

Note that I have NOT posted this direct to Alan to give the group a chance to
discuss it first - and he wouldn't accept it from me anyway as it is a FSM
change!

I have posted replies to your other mails separately so that this one stays
fairly clean and clear.

See you in Raleigh,

Paul Brittain
Data Connection.

PROPOSED CHANGE TO EXPLORER FSM IN DLSw 0.12:
=============================================
>>Instructions on how to handle each block of test are identified by lines
>>with '>>' at the front (like this one).
>>
>>Section numbers are identified thus:
Section n  Section Name:
~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>Where text is to be modified, existing and new versions are separated thus:

Existing:

(block of text to be modified)

New:

(replacement block of text)

Section 7.2  State Transition Tables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>>Add the following to the list of DLC events (Table 3)

DLC_RESOLVED  Resolve request:  DLC has received a TEST response
              frame (or equivalent for non-LAN DLCs) but has not
              reserved the resources required for a circuit yet.

>>Add the following to the list of DLC actions (Table 4)

DLC_RESOLVE   Resolve request:  DLC should issue a TEST (or
              appropriate equivalent for non-LAN DLCs) but need
              not reserve the resources required for a circuit yet.

>>Immediately after Table 4 add the following text:

DLC_RESOLVE_R and DLC_START_DL actions require the DLC to reserve the resources
necessary for a link station as they are used only when a circuit is about to
be started.  The DLC_RESOLVE action is used for topology explorer traffic and
does not require such resources to be reserved, though a DLC implementation may
choose not to distinguish this from the DLC_START_DL action.  See section 7.3
for details of the use of the DLC_RESOLVE and DLC_RESOLVED action and event
for explorer frames.

>>At the end of section, make the following edit:

Existing:

   The CANUREACH_ex, ICANREACH_ex, NETBIOS_NQ_ex, and NETBIOS_NR_ex are SSP
   messages that are not associated with a particular circuit.  The processing of
   these messages is covered by the following table:

New:

The CANUREACH_ex, ICANREACH_ex, NETBIOS_NQ_ex, and NETBIOS_NR_ex are SSP
messages that are not associated with a particular circuit.  The processing of
these messages is covered in section 7.4.

>>Delete the following table:

      +-----------------------+-------------------------------------------+
      |        Event          |                  Action(s)                |
      +-----------------------+-------------------------------------------+
      | Receive CANUREACH_ex  | Respond with ICANREACH_ex if it is known  |
      |                       | that the destination MAC address can be   |
      |                       | reached.  This can be determined using    |
      |                       | cached information or using a             |
      |                       | TEST command/TEST response exchange.      |
      +-----------------------+-------------------------------------------+
      | Receive NETBIOS_NQ_ex | Respond with NETBIOS_NR_ex if it is known |
      |                       | that the destination NETBIOS name can be  |
      |                       | reached, else send a NETBIOS NAME_QUERY   |
      |                       | using the name contained in the SSP       |
      |                       | message.  If a corresponding NETBIOS      |
      |                       | NAME_RECOGNIZED is received, send it back |
      |                       | in a NETBIOS_NR_ex to the originator of   |
      |                       | the NETBIOS_NQ_ex.                        |
      +-----------------------+-------------------------------------------+

>>Add a new section 7.4 with the following text:

7.4     Explorer Traffic

The CANUREACH_ex, ICANREACH_ex, NETBIOS_NQ_ex, and NETBIOS_NR_ex SSP
messages explore the topology of the DLSw cloud and the networks attached to
it.  These explorer frames are used to determine the DLSw partners
through which a MAC or NetBIOS name can be accessed.  This information may
optionally be cached to reduce explorer traffic in the DLSw cloud.

If a DLSw is aware from cached information that a given MAC address or NetBIOS
name is accessible through a given partner DLSw, it should direct all circuit
setup attempts to that partner.  If the circuit setup fails, or no such data is
available in the MAC or name cache database, the DLSw may fallback to issuing
the setup attempt to all DLSw partners on the assumption that the cached data
is now out of date.  The mechanism for determining when to use such a fallback
is implementation defined.

DLSW implementations may also use a local MAC cache to enable responses
to CANUREACH_ex requests to be issued without the need for TEST frame exchange
(or equivalent) until the CANUREACH_cs is received.  Again, the fallback
mechanism for determining when such local cache data is out-of-date is
implementation defined.

The use of either cache is an optional function in DLSw.  An implementation may
choose to always issue explorer frames or to use either or both types of cache.

The following sections describe the FSM used for explorer frames.  The DLC
events and actions are a subset of those described in section 7.2 for the main
circuit FSM.  The states in the explorer FSM are as follows:

     State Name            Description
     ----------            -----------
     RESET                 The initial state.
     SENT_EX               Local DLSw has issued an explorer message
     RECEIVED_EX           Local DLSw has received an explorer message
     SENT_REC_EX           An explorer frame has been both sent and received for
                           the same (potential) NetBIOS circuit.

7.4.1    RESET State

    +----------------------+---------------------+----------------------+
    |        Event         |      Action(s)      |      Next State      |
    +----------------------+---------------------+----------------------+
    | Receive CANUREACH_ex | If replying from    | If DLC_RESOLVE sent, |
    |                      | cache, send         |   RECEIVED_EX        |
    |                      | ICANREACH_ex        |                      |
    |                      | else if allowed to  |                      |
    |                      | test availability,  |                      |
    |                      | issue DLC_RESOLVE.  |                      |
    |                      | Optionally update   |                      |
    |                      | cache.              |                      |
    +----------------------+---------------------+----------------------+
    | Receive ICANREACH_ex | Optionally update   | RESET                |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | Receive NETBIOS_NQ_ex| DLC_DGRM(NAME_QUERY)| RECEIVED_EX          |
    |                      | Optionally update   |                      |
    |                      | cache.              |                      |
    +----------------------+---------------------+----------------------+
    | Receive NETBIOS_NR_ex| Optionally update   | RESET                |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | DLC_RESOLVE_C        | Send CANUREACH_ex   | SENT_EX              |
    +----------------------+---------------------+----------------------+
    | DLC_DGRM (NAME_QUERY)| Send NETBIOS_NQ_ex  | SENT_EX              |
    +----------------------+---------------------+----------------------+

7.4.2    SENT_EX State

    +----------------------+---------------------+----------------------+
    |        Event         |      Action(s)      |      Next State      |
    +----------------------+---------------------+----------------------+
    | Receive ICANREACH_ex | DLC_RESOLVE_R       | RESET                |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | Receive NETBIOS_NQ_ex| DLC_DGRM(NAME_QUERY)| SENT_REC_EX          |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | Receive NETBIOS_NR_ex| DLC_DGRM(NAME_RECOG)| RESET                |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | DLC_RESOLVE_C        |                     | SENT_EX              |
    +----------------------+---------------------+----------------------+
    | DLC_DGRM (NAME_QUERY)| Send NETBIOS_NQ_ex  | SENT_EX              |
    | (different local     | Optionally update   |                      |
    |  session number than | cache               |                      |
    |  existing searches)  |                     |                      |
    +----------------------+---------------------+----------------------+

An implementation may choose whether to handle circuit setup race conditions
either by using entirely separate FSM instances and simply allowing both ends
to issue TEST frames, or by detecting a reverse CANUREACH_ex frame here and
issuing an ICANREACH_ex message and DLC_RESOLVE_R action.

7.4.3    RECEIVED_EX State

    +----------------------+---------------------+----------------------+
    |        Event         |      Action(s)      |      Next State      |
    +----------------------+---------------------+----------------------+
    | Receive CANUREACH_ex | Optionally update   | RECEIVED_EX          |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | Receive ICANREACH_ex |                     | RECEIVED_EX          |
    +----------------------+---------------------+----------------------+
    | Receive NETBIOS_NQ_ex| DLC_DGRM(NAME_QUERY)| RECEIVED_EX          |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | Receive NETBIOS_NR_ex|                     | RECEIVED_EX          |
    +----------------------+---------------------+----------------------+
    | DLC_RESOLVED         | Send ICANREACH_ex   | RESET                |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | DLC_DGRM (NAME_QUERY)| Send NETBIOS_NQ_ex  | SENT_REC_EX          |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | DLC_DGRM (NAME_RECOG)| Send NETBIOS_NR_ex  | RESET                |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+

An implementation may choose whether to handle circuit setup race conditions
either by using entirely separate FSM instances and simply allowing both ends
to issue TEST frames, or by detecting such a reverse DLC_RESOLVE_C event here
and issuing an ICANREACH_ex message and DLC_RESOLVE_R action.

7.4.4    SENT_REC_EX State

    +----------------------+---------------------+----------------------+
    |        Event         |      Action(s)      |      Next State      |
    +----------------------+---------------------+----------------------+
    | Receive NETBIOS_NQ_ex| DLC_DGRM(NAME_QUERY)| SENT_REC_EX          |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | Receive NETBIOS_NR_ex| DLC_DGRM(NAME_RECOG)| RECEIVED_EX          |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+
    | DLC_DGRM (NAME_QUERY)| Send NETBIOS_NQ_ex  | SENT_REC_EX          |
    | (different local     | Optionally update   |                      |
    |  session number than | cache               |                      |
    |  existing searches)  |                     |                      |
    +----------------------+---------------------+----------------------+
    | DLC_DGRM (NAME_RECOG)| Send NETBIOS_NR_ex  | SENT_EX              |
    |                      | Optionally update   |                      |
    |                      | cache               |                      |
    +----------------------+---------------------+----------------------+

This state is required if an implementation wishes to manage NQ/NR crossover
cases from a single FSM instance by detecting 'opposite' NAME_QUERY attempts
between the same two NetBIOS names.  If separate FSM instances are used instead,
this state is not required and the transitions to it from other states can be
removed.

7.4.5     NetBIOS Session Numbers

NetBIOS NAME_QUERY and NAME_RECOGNIZED frames exchange NetBIOS session numbers
between the end stations.  For correct NetBIOS operation over DLSw, it is
important that all SSP NETBIOS_NQ_ex frames received by a DLSw cause NetBIOS
NAME_QUERY frames to flow on the LAN with the new session number from the
NETBIOS_NQ_ex.  These frames cannot be replied to from a cache of locally
available NetBIOS names in the same way that MAC addresses and CANUREACH_ex
messages can be handled.

Also, NAME_QUERY messages are normally retried several times on the LAN.
The generation and absorption of such frames is outside the scope of the FSM
defined above.